//
//  Header.h
//  TheTenthAnniversaryOfMobileUnion
//
//  Created by kuangbiao on 2019/1/24.
//  Copyright © 2019 kuangbiao. All rights reserved.
//

#ifndef Header_h
#define Header_h

/* 类 */
#import <YYCategories/YYCategories.h>
#import <YYImage/YYImage.h>
#import <YYWebImage/YYWebImage.h>
#import <YYModel/YYModel.h>
#import <MJRefresh/MJRefresh.h>
//#import "HttpRequest.h"
#import "AFNetworking.h"
#import "Masonry.h"
#import "HttpRequest.h"
#import "KDAlertView.h"
#import "KDLoadFrame.h"
#import "YLLoginModel.h"
#import "CMBasicData.h"
#import "YLHttpModel.h"

//颜色 -
#define UIColorFromRGB(redValue,greenValue,blueValue) [UIColor colorWithRed:(float)redValue/255.0 green:(float)greenValue/255.0 blue:(float)blueValue/255.0 alpha:1.0]

//app-
#define kAppName                     [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"]
#define IOS_VERSION                  [[[UIDevice currentDevice] systemVersion] floatValue]
#define VAL_SYS_INFO_CLIENTVERSION   [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
#define kUserdefaults                ([NSUserDefaults standardUserDefaults])
#define kiOS_VERSION                 [[UIDevice currentDevice] systemVersion]
#define kClientVersion [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]

/* 屏幕 */
#define WIDTH                        ([[UIScreen mainScreen] bounds].size.width)
#define HEIGHT                       ([[UIScreen mainScreen] bounds].size.height)
#define SCREEN_BOUNDS                ([[UIScreen mainScreen] bounds])
#define kDelNavBarHeight             ((iPhoneX || iPhoneXR || iPhoneXS_MAX) ? 88 : 64)

/* 判断设备 */
#define IPhone4                      ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640.0f, 960.0f), [[UIScreen mainScreen] currentMode].size) : NO)
#define IPhone5                      ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640.0f, 1136.0f), [[UIScreen mainScreen] currentMode].size) : NO)
#define IPhone6                      ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750.0f, 1334), [[UIScreen mainScreen] currentMode].size) : NO)
#define IPhone6Plus                  ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242.0f, 2208.0f), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhoneX                      ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125.0f, 2436.0f), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhoneXR                     ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(828.0f, 1792.0f), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhoneXS_MAX                 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242.0f, 2688.0f), [[UIScreen mainScreen] currentMode].size) : NO)




#define kiOS8  ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0 ? YES : NO)
#define kiOS9  ([[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0 ? YES : NO)

/* NSLog */
#ifdef  DEBUG
#define NSLog(fmt, ... ) printf("\n[文件名:%s] [行号:%d] [函数名:%s]  \n %s\n", [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, __FUNCTION__, [[NSString stringWithFormat:(fmt), ##__VA_ARGS__] UTF8String])
#else
#define DLog( s, ... )
#endif

#define kFILEDATA                  @"kFILEDATA"
#define kNAME                      @"kNAME"
#define kFILEPATH                  @"kFILEPATH"
#define kImageType                 @"image/png"


#define FACE_SCORE 0.9
#define FACE_SIZE_IN_IMAGE 0.3

#endif /* Header_h */
